package dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import dao.DB_Connector;

public class NguoiDungDAO {
	public void kiemTraDangNhap(String name, String pass) {
		Connection con = DB_Connector.getConnection();

		try {
			PreparedStatement cauTruyVan = con.prepareStatement("insert into NguoiDung(TenNguoiDung, Pass) values  (?, ?)");
			cauTruyVan.setString(1, name);
			cauTruyVan.setString(2, pass);
			cauTruyVan.executeUpdate();
//			ResultSet ketQua = cauTruyVan.executeQuery();
//			if (ketQua.next()) 
//			{
//				return (ketQua.getString("Name"));
//			}
		} catch (SQLException e) {
			e.printStackTrace();
		}

	}
	
}
